<%@page import="org.apache.commons.lang3.StringUtils"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="user-index-head.jsp"%> 
<%
	String str = (String)request.getAttribute("ret");
	if(!StringUtils.isEmpty(str)){
		out.print("<script>alert('"+str+"');</script>");
	}
%>
 <link rel="stylesheet" href="<%=path%>/js/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="<%=path%>/js/kindeditor/plugins/code/prettify.css" />
<script src="<%=path%>/js/kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="<%=path%>/js/kindeditor/lang/zh_CN.js" type="text/javascript"></script>
<script src="<%=path%>/js/kindeditor/plugins/code/prettify.js" type="text/javascript"></script>
<div class="content">
          <div class="cLineB">
              <h4 class="left">幸运大转盘活动信息 (待填) 条<span class="FAQ">你本月有 （待填）次机会可免收活动创建费，已经使用了 （待填）次机会!</span></h4>
                  <div class="searchbar right">
                  <form method="get"  action="index.php"  >
	                  <input type="text" id="msgSearchInput" class="txt left" placeholder="输入关键词搜索"  name="keyz" value="">
	                  <input type="hidden" name="ac" value="activity-lottery-list"  />
	                  <input type="hidden" name="id" value="9878"  />
	                  <input type="hidden" name="wxid" value="gh_423dwjkewad"  />
	                  <input type="submit" value="搜索" id="msgSearchBtn" href="" class="btnGrayS" title="搜索">
                  </form>
                  </div>
              <div class="clr"></div>
          </div>
          <div class="cLine">
            <div class="pageNavigator left">
			<a href='<%=path%>/user/lottery!add.do?lottery=LOTTERY_LOTTERY' title='新增幸运大转盘活动' class='btnGrayS vm bigbtn'>
			<img src="<%=path %>/images/img/activity-lottery.png" class="vm" />新增幸运大转盘活动</a>
              
            </div>
          
            <div class="clr"></div>
          </div>
          <div class="msgWrap">
          <form method="post"  action="" id="info" >
          <input name="delall"  type="hidden" value="" />
           <input name="wxid"  type="hidden" value="" />
            <TABLE class="ListProduct" border="0" cellSpacing="0" cellPadding="0" width="100%">
              <THEAD>
                <TR>
<TH class="select">选择</TH>
<TH>活动名称</TH>
<TH>关键字</TH>
<TH>有效参与人数</TH>
<TH>总浏览数</TH>
<TH>开始时间/结束时间</TH>
<TH>状态</TH>
<!-- <TH>外链代码</TH> -->
<TH class="norightborder">操作</TH>
                </TR>
              </THEAD>
              <TBODY>
                <TR></TR>
				<c:forEach items="${page.content}" var="vo">                  
                <TR>
                  <TD><input type="checkbox" name='del_id[]' value="842" class="checkitem"></TD>
                  <TD>${vo.lottery.title}</TD>
                  <TD>${vo.keyword}</TD> 
				  <TD>${vo.lottery.allpeople}</TD>
                  <TD>${vo.lottery.click}</TD>                  
                  <TD>${vo.lottery.startDate}<br />${vo.lottery.endDate}</TD>
                  <TD>
				  <c:choose>
				  	<c:when test="${vo.lottery.status==0}">未开始</c:when>
				  	<c:when test="${vo.lottery.status==1}">已经开始</c:when>
				  	<c:when test="${vo.lottery.status==2}">已经结束</c:when>
				  </c:choose>
				 </TD>
                  <!-- <TD>大转盘{iMicro:$list.id}</TD> -->
                   <TD class="norightborder">
				   <a href="#">SN码管理</a> 
				   <a href="<%=path%>/user/lottery!edit.do?id=${vo.id}&lottery=LOTTERY_LOTTERY">编辑</a>
				   <c:choose>
				   		<c:when test="${vo.lottery.status==0}">
				   			<a href="<%=path%>/user/lottery!changeStatus.do?id=${vo.id}&status=1&lottery=LOTTERY_LOTTERY">开始</a>			
				   		</c:when>
				   		<c:when test="${vo.lottery.status==1}">
				   			<a href="<%=path%>/user/lottery!changeStatus.do?id=${vo.id}&status=2&lottery=LOTTERY_LOTTERY">结束</a>			
				   		</c:when>
				   </c:choose>
				   
				   <a href="<%=path%>/user/lottery!delete.do?id=${vo.id}&lottery=LOTTERY_LOTTERY">删除</a></TD>
                </TR>
				</c:forEach>
                         
              </TBODY>
            </TABLE>
           </form> 
           <script>
   function checkvotethis() {
var aa=document.getElementsByName('del_id[]');
var mnum = aa.length;
j=0;
for(i=0;i<mnum;i++){
if(aa[i].checked){
j++;
}
}
if(j>0) {
document.getElementById('info').submit();
} else {
alert('未选中任何文章或回复！')
}
}

   </script>
          </div>
            
          <div class="cLine">
            <div class="pageNavigator right">
                 <div class="pages"></div>
              </div>
            <div class="clr"></div>
          </div>
        </div>

        <div class="clr"></div>
      </div>
    </div>
  </div>
  <script>

function checkAll(form, name) {
for(var i = 0; i < form.elements.length; i++) {
var e = form.elements[i];
if(e.name.match(name)) {
e.checked = form.elements['chkall'].checked;
}
}
}

function changesort(tid,sortval){

var image=new Image();   
image.src='index.php?ac=app&op=sort&wxid=gh_423dwjkewad&tid='+tid+'&sort='+sortval+'&r='+Math.random(); 

}
  </script>
  <!--底部-->
  	</div>
<include file="Public:footer"/>